package com.ruoyi.order.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.order.api.domain.ErpSellerStoreProductEvaluation;
import com.ruoyi.order.api.domain.bo.ErpSellerStoreProductEvaluationBo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "remoteEvaluationService", value = ServiceNameConstants.ORDER_SERVICE)
public interface RemoteEvaluationService {

    /**
     * 判断是否是测评单
     * @return 0：不是，1：是
     */
    @GetMapping("/gather/sellerStoreProductEvaluation/doubtEvaluation")
    public Integer doubtEvaluation(@RequestParam(value = "country", required = false) String country, @RequestParam(value = "storeId", required = false) Long storeId,
                                   @RequestParam(value = "payTime", required = false) String payTime, @RequestParam(value = "productCount", required = false) Long productCount,
                                   @RequestParam(value = "skuCode", required = false) String skuCode);

    /**
     * 提交测评
     */
    @PostMapping("/gather/sellerStoreProductEvaluation/submit")
    R<Object> submit(@RequestBody ErpSellerStoreProductEvaluationBo bo);

    /**
     * 根据订单号获取测评单
     */
    @GetMapping("/gather/sellerStoreProductEvaluation/getEvaluationByOrderId")
    ErpSellerStoreProductEvaluation getEvaluationByOrderId(@RequestParam("orderId") Long orderId);


    @GetMapping("/gather/sellerStoreProductEvaluation/judgeSuspected/{aeProductId}/{storeId}")
    Boolean judgeSuspected(@PathVariable("aeProductId") Long aeProductId, @PathVariable("storeId") Long storeId);

    @GetMapping("/gather/sellerStoreProductEvaluation/sevenDaysEvaluation/{aeProductId}")
    Boolean sevenDaysEvaluation(@PathVariable("aeProductId") Long aeProductId);
}
